package com.education.teach.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.education.teach.mvp.contract.ClassWorksContract;
import com.education.teach.mvp.model.ClassWorksModel;


@Module
public class ClassWorksModule {
    private ClassWorksContract.View view;

    /**
     * 构建ClassWorksModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ClassWorksModule(ClassWorksContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ClassWorksContract.View provideClassWorksView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ClassWorksContract.Model provideClassWorksModel(ClassWorksModel model) {
        return model;
    }
}